package com.firefly.admin.common.service.impl;

import com.firefly.admin.common.entity.FyBatchOperationResult;
import com.firefly.admin.common.mapper.FyBatchOperationResultMapper;
import com.firefly.admin.common.service.FyBatchOperationResultService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class FyBatchOperationResultServiceImpl implements FyBatchOperationResultService {

    @Autowired
    private FyBatchOperationResultMapper fyBatchOperationResultMapper;

    /**
     * 批量操作结果新增
     *
     * @param batchOperationResult 批量操作结果
     * @param <T>                  批量操作对象
     * @return 新增结果
     */
    @Override
    public <T> int save(FyBatchOperationResult<T> batchOperationResult) {
        return fyBatchOperationResultMapper.insert(batchOperationResult);
    }
}
